package com.zjlanyun.eplus.greendao;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.zjlanyun.eplus.greendao.IrActWindow;
import com.zjlanyun.eplus.greendao.IrChoiceBill;
import com.zjlanyun.eplus.greendao.IrModel;
import com.zjlanyun.eplus.greendao.IrModelAccess;
import com.zjlanyun.eplus.greendao.IrModelFields;
import com.zjlanyun.eplus.greendao.IrSearchFields;
import com.zjlanyun.eplus.greendao.IrUiMenu;

import com.zjlanyun.eplus.greendao.IrActWindowDao;
import com.zjlanyun.eplus.greendao.IrChoiceBillDao;
import com.zjlanyun.eplus.greendao.IrModelDao;
import com.zjlanyun.eplus.greendao.IrModelAccessDao;
import com.zjlanyun.eplus.greendao.IrModelFieldsDao;
import com.zjlanyun.eplus.greendao.IrSearchFieldsDao;
import com.zjlanyun.eplus.greendao.IrUiMenuDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig irActWindowDaoConfig;
    private final DaoConfig irChoiceBillDaoConfig;
    private final DaoConfig irModelDaoConfig;
    private final DaoConfig irModelAccessDaoConfig;
    private final DaoConfig irModelFieldsDaoConfig;
    private final DaoConfig irSearchFieldsDaoConfig;
    private final DaoConfig irUiMenuDaoConfig;

    private final IrActWindowDao irActWindowDao;
    private final IrChoiceBillDao irChoiceBillDao;
    private final IrModelDao irModelDao;
    private final IrModelAccessDao irModelAccessDao;
    private final IrModelFieldsDao irModelFieldsDao;
    private final IrSearchFieldsDao irSearchFieldsDao;
    private final IrUiMenuDao irUiMenuDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        irActWindowDaoConfig = daoConfigMap.get(IrActWindowDao.class).clone();
        irActWindowDaoConfig.initIdentityScope(type);

        irChoiceBillDaoConfig = daoConfigMap.get(IrChoiceBillDao.class).clone();
        irChoiceBillDaoConfig.initIdentityScope(type);

        irModelDaoConfig = daoConfigMap.get(IrModelDao.class).clone();
        irModelDaoConfig.initIdentityScope(type);

        irModelAccessDaoConfig = daoConfigMap.get(IrModelAccessDao.class).clone();
        irModelAccessDaoConfig.initIdentityScope(type);

        irModelFieldsDaoConfig = daoConfigMap.get(IrModelFieldsDao.class).clone();
        irModelFieldsDaoConfig.initIdentityScope(type);

        irSearchFieldsDaoConfig = daoConfigMap.get(IrSearchFieldsDao.class).clone();
        irSearchFieldsDaoConfig.initIdentityScope(type);

        irUiMenuDaoConfig = daoConfigMap.get(IrUiMenuDao.class).clone();
        irUiMenuDaoConfig.initIdentityScope(type);

        irActWindowDao = new IrActWindowDao(irActWindowDaoConfig, this);
        irChoiceBillDao = new IrChoiceBillDao(irChoiceBillDaoConfig, this);
        irModelDao = new IrModelDao(irModelDaoConfig, this);
        irModelAccessDao = new IrModelAccessDao(irModelAccessDaoConfig, this);
        irModelFieldsDao = new IrModelFieldsDao(irModelFieldsDaoConfig, this);
        irSearchFieldsDao = new IrSearchFieldsDao(irSearchFieldsDaoConfig, this);
        irUiMenuDao = new IrUiMenuDao(irUiMenuDaoConfig, this);

        registerDao(IrActWindow.class, irActWindowDao);
        registerDao(IrChoiceBill.class, irChoiceBillDao);
        registerDao(IrModel.class, irModelDao);
        registerDao(IrModelAccess.class, irModelAccessDao);
        registerDao(IrModelFields.class, irModelFieldsDao);
        registerDao(IrSearchFields.class, irSearchFieldsDao);
        registerDao(IrUiMenu.class, irUiMenuDao);
    }
    
    public void clear() {
        irActWindowDaoConfig.clearIdentityScope();
        irChoiceBillDaoConfig.clearIdentityScope();
        irModelDaoConfig.clearIdentityScope();
        irModelAccessDaoConfig.clearIdentityScope();
        irModelFieldsDaoConfig.clearIdentityScope();
        irSearchFieldsDaoConfig.clearIdentityScope();
        irUiMenuDaoConfig.clearIdentityScope();
    }

    public IrActWindowDao getIrActWindowDao() {
        return irActWindowDao;
    }

    public IrChoiceBillDao getIrChoiceBillDao() {
        return irChoiceBillDao;
    }

    public IrModelDao getIrModelDao() {
        return irModelDao;
    }

    public IrModelAccessDao getIrModelAccessDao() {
        return irModelAccessDao;
    }

    public IrModelFieldsDao getIrModelFieldsDao() {
        return irModelFieldsDao;
    }

    public IrSearchFieldsDao getIrSearchFieldsDao() {
        return irSearchFieldsDao;
    }

    public IrUiMenuDao getIrUiMenuDao() {
        return irUiMenuDao;
    }

}
